package co.fitstart.signin.dao;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;

import co.fitstart.entity.course.round.CourseRound;
import co.fitstart.entity.course.schedule.TargetData;
import co.fitstart.entity.user.Student;
import co.fitstart.entity.user.StudentTargetData;

/**
 * 
 * @author dan
 *
 */
@Dao("hibernate")
public interface StudentTargetDao {
    
    /**
     * 
     * @param student
     * @param courseRound
     * @return
     */
    @Query("FROM StudentTargetData WHERE disabled = false AND student = :student AND courseRound = :courseRound")
    public StudentTargetData load(@Variable("student") Student student, @Variable("courseRound") CourseRound courseRound);
    
    /**
     * 
     * @return
     */
    @Query("FROM TargetData")
    public TargetData load();

}
